package com.leapp.sk.viewdelegate.classs

import android.content.Intent
import android.support.v4.content.ContextCompat
import android.text.Editable
import android.text.TextUtils
import android.text.TextWatcher
import android.view.View
import com.example.mvp.delegate.BaseAppDelegate
import com.example.mvp.view.SKTopBar
import com.leapp.sk.R
import com.leapp.sk.ui.activity.classs.GroupManagerActivity

/**
 * 群管理视图托管类
 * @author  chaohaipeng  on 2018/8/1.
 */
class GroupMamagerDelgate: BaseAppDelegate(){
    override fun initWidget() {
    }

    override fun initLayoutRes(): Int {
        return R.layout.activity_group_manager

    }


    /**
     * 设置标题栏
     */
    fun setTitle(title:String?){
        if (!TextUtils.isEmpty(title)){
            val jtb_agm= getView<SKTopBar>(R.id.jtb_agm)
            jtb_agm.setTitle(title)
        }
        setEvent()
    }

    /**
     * 设置设置事件
     */
    fun setEvent(){
        val jtb_agm= getView<SKTopBar>(R.id.jtb_agm)
        jtb_agm?.setEventInterface(object : SKTopBar.EventInterface{
            override fun leftOnClick() {
                getActivity<GroupManagerActivity>().finish()

            }
            override fun rightOnClick() {

            }

        })
    }
}